﻿@model BcdFileListViewModel
@{
    Layout = null;
    ViewBag.Title = "案卷目录修改";
}
<script type="text/javascript">
    function volumeEdit(json) {
        DWZ.ajaxDone(json);
        if (json.statusCode == DWZ.statusCode.ok) {
            if ($("#div_VolumeDirectoryList").length > 0) {
                $("#div_VolumeDirectoryList").loadUrl('/CompletionMaterials/FileList/VolumedirectoryList', "id=" + json.id, null);
            } else {
                $("form[name='pagerForm_volume']", navTab.getCurrentPanel()).submit();
            }
            $.pdialog.closeCurrent();
        }
    }
</script>
<script src="/Scripts/jQuery/jquery.validate.min.js" type="text/javascript"></script>
<script src="/Scripts/jQuery/jquery.validate.unobtrusive.min.js" type="text/javascript"></script>
@{Html.EnableClientValidation();}
@using (Html.BeginForm("VolumeEditPost", "FileList", null, FormMethod.Post, new { onsubmit = "return validateCallback(this,volumeEdit);", @class = "pageForm required-validate" }))
{
    <div class="pageFormContent sortDrag" layouth="60">
        @Html.TextBoxFor(model => model.TheBcdVolumedirectoryInfo.Fl_ID, new { @type = "hidden" })
        @Html.TextBoxFor(model => model.TheBcdVolumedirectoryInfo.Vd_ID, new { @type = "hidden" })
        @Html.TextBoxFor(model => model.TheBcdVolumedirectoryInfo.Vd_State, new { @type = "hidden" })
        <table class="tab01 tabNo" width="95%;">
            
            <tr>
                <td class="td1" style="width: 30%;">文件编号：</td>
                <td>
                    @Html.TextBoxFor(model => model.TheBcdVolumedirectoryInfo.Vd_Code, new { @class = "input02" })
                </td>
            </tr>
            <tr>
                <td class="td1">责任者：</td>
                <td>
                    @Html.TextBoxFor(model => model.TheBcdVolumedirectoryInfo.Vd_Duty, new { @class = "input02" })
                    @Html.ValidationMessageFor(model => model.TheBcdVolumedirectoryInfo.Vd_Duty)
                </td>
            </tr>
            <tr>
                <td class="td1">文件材料题名：</td>
                <td>
                    @Html.TextAreaFor(model => model.TheBcdVolumedirectoryInfo.Vd_Name, new { cols = "3", @class = "input05" })
                    @Html.ValidationMessageFor(model => model.TheBcdVolumedirectoryInfo.Vd_Name)
                </td>
            </tr>
            <tr>
                <td class="td1">日期：</td>
                <td>
                    @Html.TextBoxFor(model => model.TheBcdVolumedirectoryInfo.Vd_Date, new { @class = "date input02", @readonly = "readonly", format = "yyyy-MM-dd", Value = (Model.TheBcdVolumedirectoryInfo.Vd_Date == null ? "" : Convert.ToDateTime(Model.TheBcdVolumedirectoryInfo.Vd_Date).ToString("yyyy-MM-dd")) })
                    @Html.ValidationMessageFor(model => model.TheBcdVolumedirectoryInfo.Vd_Date)
                </td>
            </tr>
            <tr>
                <td class="td1">总页数：</td>
                <td>
                    @Html.TextBoxFor(model => model.TheBcdVolumedirectoryInfo.Vd_PageNumb, new { @class = "input02 digits" })
                    @Html.ValidationMessageFor(model => model.TheBcdVolumedirectoryInfo.Vd_PageNumb)
                </td>
            </tr>
            <tr>
                <td class="td1">卷内序号：</td>
                <td>
                    @Html.TextBoxFor(model => model.TheBcdVolumedirectoryInfo.Vd_Order, new { @class = "input02" })
                </td>
            </tr>
            <tr>
                <td class="td1">卷内页数：</td>
                <td>
                    @Html.TextBoxFor(model => model.TheBcdVolumedirectoryInfo.Vd_Page, new { @class = "input02" })
                </td>
            </tr>
            <tr>
                <td class="td1">备注：</td>
                <td>
                    @Html.TextAreaFor(model => model.TheBcdVolumedirectoryInfo.Vd_Remark, new { cols = "3", @class = "input05" })
                </td>
            </tr>
            <tr>
                <td class="td1">附件：</td>
                <td id="td_ass">
                    <button id="dialogBtn_edit" type="button">附件文件管理</button>
                </td>
            </tr>
        </table>
    </div>

    <div class="formBar">
        <ul>
            <li>
                <button type="submit" class="btn btn-sm" onclick="">保存</button>
            </li>
            <li>
                <button type="button" class="close btn btn-default btn-sm">取消</button>
            </li>

        </ul>
    </div>
}

<div id="dialog_file_edit">
    <iframe id="myIframe_edit" src="" frameborder="no" border="0" marginwidth="0" marginheight="0" scrolling="no"
            style="height:400px; width:1150px;"></iframe>
</div>
<script>
    $("#dialog_file_edit").dialog({
        title:"附件管理",
        autoOpen: false,
        modal: true,
        width:1200,
        height: 450,
        open: function(ev, ui){
            $('#myIframe_edit').attr('src','CompletionMaterials/FileManager/Index?filePath=@ViewBag.FilePath');
        }
    });

    $('#dialogBtn_edit').click(function () {
        $('#dialog_file_edit').dialog('open');
    });
</script>